home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
mus
/
play
/
oplay1231.lha
/
src
/
forms.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-09-26
|
4KB
|
143 lines
/*
* OmniPlay, v0.98
* by David Champion
*
* format identifiers and data structures
* 29 Aug 92
*/
#include <exec/types.h>
/***********
* IFF-8SVX *
***********/
/*typedef LONG ID;*/
#define WordAlign(size) ((size+1)&~1)
#define MakeID(a,b,c,d) ( (LONG)(a)<<24L | (LONG)(b)<<16L | (c)<<8 | (d) )
struct ChunkHeader {
LONG ckID;
LONG ckSize;
};
#define ID_FORM MakeID('F','O','R','M') /* iff req'd */
#define ID_8SVX MakeID('8','S','V','X') /* iff req'd */
#define ID_VHDR MakeID('V','H','D','R') /* iff req'd */
#define ID_NAME MakeID('N','A','M','E') /* iff opt'l */
#define ID_COPY MakeID('(','c',')',' ') /* iff opt'l */
#define ID_AUTH MakeID('A','U','T','H') /* iff opt'l */
#define ID_ANNO MakeID('A','N','N','O') /* iff opt'l */
#define ID_BODY MakeID('B','O','D','Y') /* iff req'd */
#define ID_NULL 0L /* No ID */
#define sCmpNone 0 /* not compressed */
#define sCmpFibDelta 1 /* Fibonacci-delta encoding (Appendix C) */
#define sCmpPPacked 1<<7 /* nonstandard: PowerPacked BODY */
/* Could be more kinds in the future. */
struct Voice8Header {
ULONG oneShotHiSamples; /* # samples in the high octave 1-shot part */
ULONG repeatHiSamples; /* # samples in the high octave repeat part */
ULONG samplesPerHiCycle; /* # samples/cycle in high octave, else 0 */
UWORD samplesPerSec; /* data sampling rate */
UBYTE ctOctave; /* # of octaves of waveforms */
UBYTE sCompression; /* data compression technique used */
LONG volume; /* playback nominal volume from 0 to Unity */
};
/*******
* AIFF *
*******/
#define ID_AIFF MakeID('A','I','F','F')
#define ID_COMM MakeID('C','O','M','M')
#define ID_SSND MakeID('S','S','N','D')
#define ID_COMT MakeID('C','O','M','T')
struct CommonChunk {
UWORD numChannels;
ULONG numSampleFrames;
UWORD sampleSize;
UBYTE sampleRate[10]; /* typed as Extended in official documentation */
};
/*****************
* Creative Voice *
*****************/
#define ID_VOCH MakeID('C','r','e','a')
/* This is very bad. Wish I had a decent spec. */
/* Wish VOC were never spawned. I hate this. */
/* Never mind, we'll do it Mike's way. */
//struct VocHdr {
// char ID[18];
// char EOFTag;
// UWORD Block1Offset;
// UBYTE MinVersion;
// UBYTE MajVersion;
// UBYTE MinVersionInv;
// UBYTE MajVersionInv;
//};
//struct VocBlockHdr {
// UBYTE Type;
// UBYTE Size3[3];
// UBYTE Info;
//}
/***********
* RIFF-WAV *
***********/
#define ID_RIFF MakeID('R','I','F','F')
#define ID_WAVE MakeID('W','A','V','E')
#define ID_fmt_ MakeID('f','m','t',' ')
#define ID_data MakeID('d','a','t','a')
#define ID_INFO MakeID('I','N','F','O')
#define ID_IARL MakeID('I','A','R','L')
#define ID_IART MakeID('I','A','R','T')
#define ID_ICMT MakeID('I','C','M','T')
#define ID_ICOP MakeID('I','C','O','P')
#define ID_IENG MakeID('I','E','N','G')
#define ID_IGNR MakeID('I','G','N','R')
#define ID_INAM MakeID('I','N','A','M')
#define ID_IPRD MakeID('I','P','R','D')
#define ID_ISBJ MakeID('I','S','B','J')
#define ID_ISFT MakeID('I','S','F','T')
#define ID_ITCH MakeID('I','T','C','H')
struct WaveCommon {
UWORD wFormatTag;
UWORD wChannels;
ULONG dwSamplesPerSec;
ULONG dwAvgBytesPerSec;
UWORD wBlockAlign;
};
/******************
* Sun/NeXT (.au) *
******************/
#define ID__SND MakeID('.','s','n','d')
#define SND_FORMAT_MULAW_8 1L
#define SND_FORMAT_LINEAR_8 2L
#define SND_FORMAT_LINEAR_16 3L
struct SNDSoundStruct {
ULONG magic;
ULONG dataLocation;
ULONG dataSize;
ULONG dataFormat;
ULONG samplingRate;
ULONG channelCount;
char info[4];
};
/*******************
* PowerPacked file *
*******************/
#define ID_PP20 MakeID('P','P','2','0')